import { Entity, Column } from "typeorm";

import { Formula } from "qqlx-core";
import { Paster, PasterGateway, ENUM_PASTER, FormulaGateway } from "qqlx-core";

import { TransformerEnum } from "@lib/orm.transfor.enum";

import { IdIntroSchema } from "@/alpha/ext.id.intro";

@Entity({ name: PasterGateway.relations })
export class PasterSchema extends IdIntroSchema implements Paster {
  @Column({ transformer: new TransformerEnum(Object.values(ENUM_PASTER), ENUM_PASTER.NONE) })
  type: ENUM_PASTER = ENUM_PASTER.NONE;
}

@Entity({ name: FormulaGateway.relations })
export class FormulaSchema extends IdIntroSchema implements Formula {}
